﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using Wolfut.MirageEE.Kernal.Common;

namespace Wolfut.MirageEE.Domain.Products
{
    /// <summary>
    /// 产品初始余额
    /// </summary>
    /// <remarks>
    /// Author: LEO
    /// Date:2009-03-15
    /// </remarks>
    [ActiveRecord("PRODUCT_INIT_BALANCES")]
    public class ProductInitBalance : PersistentObjectWithGuid
    {
        #region 数量
        private decimal productSum;
        [Property("PRODUCT_SUM")]
        public virtual decimal ProductSum
        {
            get { return productSum; }
            set { productSum = value; }
        }
        #endregion

        #region 单位成本
        private decimal unitPrice;
        [Property("UNIT_PRICE")]
        public virtual decimal UnitPrice
        {
            get { return unitPrice; }
            set { unitPrice = value; }
        }
        #endregion

        #region 金额
        private decimal initBalance;
        [Property("INIT_BALANCE")]
        public virtual decimal InitBalance
        {
            get { return initBalance; }
            set { initBalance = value; }
        }
        #endregion
        #region 备注
        private string remarks;
        [Property("REMARKS")]
        [ValidateLength(0, 500, "备注超长")]
        public virtual string Remarks
        {
            get { return remarks; }
            set { remarks = value; }
        }
        #endregion

        #region 余额日期
        private DateTime balanceDate;

        [Property("BALANCE_DATE")]
        public virtual DateTime BalanceDate
        {
            get { return balanceDate; }
            set { balanceDate = value; }
        }

        #endregion
        #region 仓库ID
        private string warehouseID = string.Empty;
        [Property("WAREHOUSE_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "仓库ID超长")]
        public virtual string WarehouseID
        {
            get { return warehouseID; }
            set { warehouseID = value; }
        }
        #endregion

        #region 商品ID
        private string produceID = string.Empty;
        [Property("PRODUCT_ID")]
        [ValidateNonEmpty, ValidateLength(0, 40, "商品ID超长")]
        public virtual string ProduceID
        {
            get { return produceID; }
            set { produceID = value; }
        }
        #endregion

        #region 是否删除
        private bool isDeleted;
        [Property("IS_DELETED")]
        public virtual bool IsDeleted
        {
            get { return isDeleted; }
            set { isDeleted = value; }
        }
        #endregion
    }
}
